import { domainService } from "~/config/server";
import { NetService } from "~/utils/net.service";
import { Inject, Debounce } from "~/core/decorator";
import { FilterService } from "~/utils/filter.service";
import { Service } from "~/core/service";

export class TelCaseManageService extends Service {
  @Inject(NetService)
  private netService: NetService;

  /**
   * 电催待分配查询列表
   */
  public waitDistribution (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.waitDistribution,
      data,
      page,
      sort
    });
  }

  /**
   * 电催个人案件池查询列表
   */
  public personalCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.personalCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 电催团队案件池查询列表
   */
  public teamCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.teamCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 回收案件池查询列表
   */
  public recoverCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.recoverCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 结清案件池查询列表
   */
  public settleCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.settleCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 结清案件池查询列表
   */
  public pauseCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.pauseCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 归C案件池查询列表
   */
  public returnCCasePool (data, page?, sort?) {
    return this.netService.send({
      server: domainService.telCaseManageController.returnCCasePool,
      data,
      page,
      sort
    });
  }

  /**
   * 电催案件待分配手动分案预览
   */
  public telCaseManualDistribution (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.telCaseManualDistribution,
      data
    });
  }
  /**
   * 电催案件待分配手动分案确定分案
   */
  public confirmDistributeCase (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.confirmDistributeCase,
      data
    });
  }

  /**
   * 电催案件手动分案预览
   */
  public reviewDistributeCase (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.reviewDistributeCase,
      data
    });
  }

  /**
   * 案件回收
   */
  public returnCase (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.returnCase,
      data
    });
  }

  /**
   * 移入电催待分配
   */
  public moveToWaitDistribution (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.moveToWaitDistribution,
      data
    });
  }

  /**
   * 个人案件池查询列表逾期总金额
   */
  public personalCasePoolAmount (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.personalCasePoolAmount,
      data,
    });
  }

  /**
   * 出催案件池查询列表逾期总金额
   */
  public settleCasePoolAmount (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.settleCasePoolAmount,
      data,
    });
  }
  /**
   * 团队案件池查询列表逾期总金额
   * @param data
   */
  public teamCasePoolAmount (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.teamCasePoolAmount,
      data
    });
  }

  /**
   * 待分配案件池分案查询所选案件中的部门剩余催收天数的最小值
   * @param data
   */
  public getRemainingPartCollectionDays (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.getRemainingPartCollectionDays,
      data: {
        caseIds: data
      }
    });
  }

  /**
   * 委托方回收
   */
  public dealManualPartReturnCase (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.dealManualPartReturnCase,
      data
    });
  }
  /**
   * 转派获取选择的金额合计
   */
  public transferCaseAmount (data) {
    return this.netService.send({
      server: domainService.telCaseManageController.transferCaseAmount,
      data
    });
  }
}
